﻿using NHibernate;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Linq;
using GENERIC.Respository.Interfaces;

namespace GENERIC.NHRepository
{
    public class NHContext : IContext
    {
        #region Constructeur

        public NHContext(ISession session)
        {
            Session = session;
        }

        #endregion

        #region Properties

        private ISession Session { get; set; }

        #endregion
        
        
        public IGENERICSet<TEntity> CreateSet<TEntity>() where TEntity : class, new()
        {
            throw new NotImplementedException();
        }

        public void SaveChanges()
        {
            throw new NotImplementedException();
        }

        public void Dispose()
        {
            if (Session != null)
            {
                Session.Dispose();
            }
        }


        public Respository.Interfaces.ITransaction BeginTransaction()
        {
            throw new NotImplementedException();
        }
    }
}
